package com.seafood.dto;

import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 温度监控日志DTO
 */
@Data
public class TemperatureLogDTO {
    
    private Long id;
    
    private Long coldChainRecordId;
    
    @NotNull(message = "记录时间不能为空")
    private String recordTime;
    
    @NotNull(message = "温度不能为空")
    @DecimalMin(value = "-50.0", message = "温度不能低于-50°C")
    @DecimalMax(value = "50.0", message = "温度不能高于50°C")
    private BigDecimal temperature;
    
    @DecimalMin(value = "0.0", message = "湿度不能小于0%")
    @DecimalMax(value = "100.0", message = "湿度不能超过100%")
    private BigDecimal humidity;
    
    private String location;
    
    private String gpsCoordinates;
    
    private String deviceId;
    
    private Boolean deviceOnline;
    
    private BigDecimal batteryLevel;
    
    private Integer signalStrength;
    
    private Boolean isAbnormal;
    
    private String abnormalReason;
    
    private String createdAt;
}